/**
  * This file is part of Medusa.
  *
  * Authors: Uriel Fanelli <uriel.fanelli@gmail.com>
  *          Perthect <perthect@gmail.com>
  *          Marco Bizzarri <Marco.Bizzarri@gmail.com>
  *
  *
  * Medusa is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.

  * Medusa is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.

  * You should have received a copy of the GNU General Public License
  * along with Medusa; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */


#ifndef TABWIDGET_H
#define TABWIDGET_H

#include <QTabWidget>
#include <QUrl>
#include <QIcon>
#include <QString>
#include <QWebView>

#include <QHBoxLayout>
#include <QMainWindow>

#include "gprogressbar.h"
//#include "goongress.h"
#include "statusbar.h"

#include "singletab.h"
class singleTab;

class tabWidget : public QTabWidget
{
    Q_OBJECT
public:
    tabWidget(GProgressBar *,QTAstbar *);
    QTAstbar *qsb;
    singleTab *stab;

private:
    QNetworkAccessManager *manager;
    QWidget *finestrella;
    QHBoxLayout *qbl;
    GProgressBar *progressBar;

    singleTab *webView(int index) const;
    bool noTabsOn();
    void createTabForURL(QUrl url, QIcon icon, QString label);
    int findMatchingTab(QUrl url);

public slots:
    singleTab *currentWebView() const;
    void aggiungitab(QUrl,QIcon,QString);
    void aggiornatab(int);
    void aggiornatabtip(QUrl);

    void pageback(int);
    void pageforward(int);
    void stopload(int);

    void chiuditab(int);

};
class singletab;

#endif // TABWIDGET_H
